package com.jy.adscm.operation.xjfile.bean;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author zyl
 * @since 2019-05-07
 */
public class XjFile implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    /**
     * 父级菜单
     */
    @TableField("parentId")
    private Integer parentId;
    /**
     * 文件名
     */
    private String name;
    /**
     * 文件编码
     */
    private String code;
    /**
     * 文件描述
     */
    private String content;
    private String creator;
    @TableField(exist = false)
    private String creatorName;
    /**
     * 排列
     */
    private Integer rank;
    @TableField("createTime")
    private Date createTime;
    @TableField(exist = false)
    List<XjFile> chlidren;

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public List<XjFile> getChlidren() {
        return chlidren;
    }

    public void setChlidren(List<XjFile> chlidren) {
        this.chlidren = chlidren;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Integer getRank() {
        return rank;
    }

    public void setRank(Integer rank) {
        this.rank = rank;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getCreateTime() {
        return createTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "XjFile{" +
        "id=" + id +
        ", parentId=" + parentId +
        ", name=" + name +
        ", code=" + code +
        ", content=" + content +
        ", creator=" + creator +
        ", rank=" + rank +
        ", createTime=" + createTime +
        "}";
    }
}
